package com.ark.common.mybatis.permission.expression;

import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.operators.relational.InExpression;

/**
 * 支持in条件值一端，两边添加括号  例  in （xx，xx）,包括其它的AndExpression、OrExpression也是这样拓展
 *
 * @author MR.Liu
 */
public class InExpressionX extends InExpression {
    public InExpressionX() {
    }

    public InExpressionX(Expression leftExpression, Expression rightExpression) {
        super(leftExpression, rightExpression);
    }

    @Override
    public String toString() {
        return this.getLeftExpression() + " IN (" + this.getRightExpression() + ")";
    }
}
